(* priv->image_module->stop_load) (priv->context);
priv->closed = TRUE;
+
+ gtk_signal_emit (GTK_OBJECT (loader),
+ pixbuf_loader_signals[CLOSED],
+ x, y,
+ /* sanity check in here. Defend against an errant loader */
+ MIN (width, gdk_pixbuf_get_width (priv->pixbuf)),
+ MIN (height, gdk_pixbuf_get_height (priv->pixbuf)));
}
struct _Gif89
{
int transparent;
+ int delay_time;
+ int input_flag;
+ int disposal;
};
typedef struct _GifContext GifContext;
unsigned int width;
unsigned int height;
CMap color_map;
+ CMap frame_color_map;
unsigned int bit_pixel;
unsigned int color_resolution;
unsigned int background;
return retval;
}
+static GifContext *
+new_context (void)
+{
+ GifContext *context;
+
+ context = g_new (GifContext, 1);
+ context->pixbuf = NULL;
+ context->file = NULL;
+ context->state = GIF_START;
+ context->prepare_func = NULL;
+ context->update_func = NULL;
+ context->user_data = NULL;
+ context->buf = NULL;
+ context->amount_needed = 0;
+ context->gif89.transparent = -1;
+ context->gif89.delay_time = -1;
+ context->gif89.input_flag = -1;
+ context->gif89.disposal = -1;
+ return context;
+}
/* Shared library entry point */
GdkPixbuf *
image_load (FILE *file)
g_return_val_if_fail (file != NULL, NULL);
- context = g_new (GifContext, 1);
+ context = new_context ();
context->file = file;
- context->pixbuf = NULL;
- context->state = GIF_START;
- context->prepare_func = NULL;
- context->update_func = NULL;
gif_main_loop (context);
#ifdef IO_GIFDEBUG
count = 0;
#endif
- context = g_new (GifContext, 1);
+ context = new_context ();
context->prepare_func = prepare_func;
context->update_func = update_func;
context->user_data = user_data;
- context->file = NULL;
- context->pixbuf = NULL;
- context->state = GIF_START;
- context->buf = NULL;
- context->amount_needed = 0;
+
return (gpointer) context;
}
(* priv->image_module->stop_load) (priv->context);
priv->closed = TRUE;
+
+ gtk_signal_emit (GTK_OBJECT (loader),
+ pixbuf_loader_signals[CLOSED],
+ x, y,
+ /* sanity check in here. Defend against an errant loader */
+ MIN (width, gdk_pixbuf_get_width (priv->pixbuf)),
+ MIN (height, gdk_pixbuf_get_height (priv->pixbuf)));
}